import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { StatisticAnalysisComponent } from './statistic-analysis.component';
import { BasicAnalysisComponent } from './basic-analysis/basic-analysis.component';
import { CostAnalysisComponent } from './cost-analysis/cost-analysis.component';
import { DrugUseAnalysisComponent } from './drug-use-analysis/drug-use-analysis.component';
import { PrescriptionsAnalysisComponent } from './prescriptions-analysis/prescriptions-analysis.component';
import { RecipeDataComponent } from './recipe-data/recipe-data.component';
import { UserInfoResolver } from 'src/app/core/service/auth/auth.resolve.service';

const routes: Routes = [
	{
		path: '',
		component: StatisticAnalysisComponent,
		children: [
			{
				path: 'basic-analysis',
                component: BasicAnalysisComponent,
                resolve: {
                    user: UserInfoResolver
                }
            },
            {
                path: 'cost-analysis',
                component: CostAnalysisComponent,
                resolve: {
                    user: UserInfoResolver
                }
            },
            {
                path: 'drug-use-analysis',
                component: DrugUseAnalysisComponent,
                resolve: {
                    user: UserInfoResolver
                }
            },
            {
                path: 'prescriptions-analysis',
                component: PrescriptionsAnalysisComponent,
                resolve: {
                    user: UserInfoResolver
                }
            },
            {
                path: 'recipe-data',
                component: RecipeDataComponent,
                resolve: {
                    user: UserInfoResolver
                }
			}
		]
	}
];

@NgModule({
	imports: [
		RouterModule.forChild(routes)
	],
	exports: [
		RouterModule
	]
})
export class StatisticAnalysisRoutingModule {
	constructor() {}
}
